#include "mainwindow.h"
#include <QScreen>
#include <QApplication>
#include <QDebug>

int main(int argc, char *argv[])
{
    QApplication a(argc, argv);
    MainWindow w;

    QScreen *screen = QGuiApplication::primaryScreen();
    if (screen) {
        QRect availableSize = screen->availableGeometry();
        qDebug() << "Available Size:" << availableSize.width() << "x" << availableSize.height();
        if(float(availableSize.width())/float(availableSize.height())>1.8)
            w.resize(availableSize.width()/2, availableSize.height()/2*1.3);
        else
            w.resize(availableSize.width()/1.5, availableSize.height()/1.5*1.2);
    }


    w.show();
    w.setWindowTitle("高频感应加热器控制");
    return a.exec();
}
